package com.stedu.mall.common.service;

import com.github.pagehelper.PageInfo;
import com.stedu.mall.common.bean.Order;
import com.stedu.mall.common.bean.OrderVo;
import com.stedu.mall.common.exception.SteduException;

import java.util.List;

public interface OrderService {
    //添加订单
    void insert(OrderVo orderVo) throws SteduException;
    //删除订单
    boolean delete(String id);
    //修改
    boolean update(Order order);
    //通过id查询
    Order selectById(String id,Integer userId) throws SteduException;
    Order selectById1(String id) throws SteduException;//管理员用的
    //通过userId查询
    List<Order> selectByUserId(Integer userId);
    //查询所有--分页查询--根据用户id查询(我的订单)用这个写
    PageInfo<Order> selectByCondition(Order condition, Integer pageNum, Integer pageSize);

    void pay(OrderVo orderVo) throws SteduException;
    void pay1(OrderVo orderVo) throws SteduException;

    void updateMoney(Order order);

    void updateMoney1(String id) throws SteduException;

    void updateGoodsMoney(Order order);

    void updateGoodsMoney1(String id) throws SteduException;
}
